<style lang="less" scoped>
.panel {
  margin-bottom: 10px;
  &-title {
    display: flex;
    padding: 10px;
    border-bottom: 0.1px solid #eaeaea;
    background: white;

    &__label {
      flex: 1;
      font-size: 16px;
      align-items: center;
    }
  }
  &-content {
    margin-bottom: 10px;
    background: white;

    &__item {
      display: flex;
      padding: 10px 10px 0 10px;
      font-size: 14px;
      &-label {
        color: #666;
        width: 100px;
      }
      &-value {
        flex: 1;
        padding-left: 15px;
        color: #333;
      }
    }
  }
}
.main-pic {
  width: 400px;
  height: 200px;
}
</style>

<template>
  <div class="panel">
    <!-- content -->
    <div class="panel-content">
      <div class="panel-content__item">
        <div class="panel-content__item-label">案由</div>
        <div class="panel-content__item-value">{{item.case_reason||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">案号</div>
        <div class="panel-content__item-value">{{item.case_no||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">开庭日期</div>
        <div class="panel-content__item-value">{{item.open_time||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">地区</div>
        <div class="panel-content__item-value">{{item.province||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">排期日期</div>
        <div class="panel-content__item-value">{{item.schedule_time||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
    </div>
    <!-- content -->
    <div class="panel-content">
      <div class="panel-content__item">
        <div class="panel-content__item-label">承办部门</div>
        <div class="panel-content__item-value">{{item.undertake_department||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">审判长/主审人</div>
        <div class="panel-content__item-value">{{item.chief_judge||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">上述人</div>
        <div class="panel-content__item-value">{{item.prosecutor&&item.prosecutor.name||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">被上述人</div>
        <div class="panel-content__item-value">{{item.defendant&&item.defendant.name||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">法院</div>
        <div class="panel-content__item-value">{{item.execute_gov||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">法庭</div>
        <div class="panel-content__item-value">{{item.execute_unite||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">公告内容</div>
        <div class="panel-content__item-value">{{item.content||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      item: {
        // CaseList: null,
        // case_no: '(2018)皖01民初363号',
        // case_reason: '侵害商标权纠纷',
        // chief_judge: '',
        // content:
        //   '我院定于2018年05月22日 09时00分在本院知产第四法庭依法开庭审理被告怀宁万科房地产开发有限公司与原告万科企业股份有限公司侵害商标权纠纷一案。ሴ案号：(2018)皖01民初363号ሴ承办人：胡娟',
        // defendant: [
        //   {
        //     keyno: '0d6db82c4bd16397c071405cfb04bc30',
        //     name: '怀宁万科房地产开发有限公司'
        //   }
        // ],
        // execute_gov: '合肥市中级人民法院',
        // execute_unite: '知产第四法庭',
        // open_time: '2018-05-22 09:00:00',
        // prosecutor: [
        //   {
        //     keyno: '6bc7e7ccdb755391651316a0227c059b',
        //     name: '万科企业股份有限公司'
        //   }
        // ],
        // province: '安徽',
        // provinceName: '安徽',
        // schedule_time: '',
        // undertake_department: ''
      }
    };
  },
  onShow() {
    this.getInfos();
  },
  methods: {
    async getInfos() {
      const url = '/xcx/getCountNoticeDetail';
      const params = {
        noticeId: this.$route.query.id
      };
      const res = await this.$http.get(url, params);
      if (res.status != 200) {
        wx.showToast({
          title: res.message || '获取失败！',
          icon: 'none',
          mask: true
        });
        return;
      }
      this.item = res.result;
    }
  }
};
</script>
